{include file="common/header"}
<div class="content-wrapper">
    {include file="auth_rule/nav"/}
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="nav-tabs-custom">
                    {include file="auth_rule/tabs"/}
                    <div class="tab-content">
                        <form method="post" class="form-horizontal form" id="post_form">
                            <div class="panel panel-info">
                                <div class="panel-heading">
                                    添加任务
                                </div>
                                <div class="panel-body">

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">任务标题</label>
                                        <div class="col-sm-7"><input class="form-control" name="title"  placeholder="请输入任务标题"></div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">开始时间</label>
                                        <div class="col-sm-7"><input class="form-control" name="start_time"  placeholder="请输入开始时间"></div>
                                    </div>                                                                                                                                           
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">结束时间</label>
                                        <div class="col-sm-7"><input class="form-control" name="end_time"  placeholder="请输入结束时间"></div>
                                    </div>
									<div class="form-group">
                                        <label class="col-sm-2 control-label">奖金金额</label>
                                        <div class="col-sm-7"><input class="form-control" name="unit_price"  placeholder="请输入奖金金额"></div>
                                    </div>
									<div class="form-group">
                                        <label class="col-sm-2 control-label">奖金积分</label>
                                        <div class="col-sm-7"><input class="form-control" name="give_credit1"  placeholder="请输入奖金积分"></div>
                                    </div>
									<div class="form-group">
                                        <label class="col-sm-2 control-label">任务地址</label>
                                        <div class="col-sm-7"><input class="form-control" name="about_url"  placeholder="请输入任务地址"></div>
                                    </div>
									<div class="form-group">
                                        <label class="col-sm-2 control-label">任务份数</label>
                                        <div class="col-sm-7"><input class="form-control" name="ticket_num"  placeholder="请输入任务份数"></div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-sm-6 col-xs-12 col-sm-offset-2">
                                            <input type="hidden" name="id" value="{$item['id']?$item['id']:0}">
                                            <button type="button" name="submit" class="btn btn-primary">提交</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <script type="text/javascript">
                            $(function () {
                                //提交分类信息
                                $("button[name='submit']").click(function () {
                                    $.post(
                                        window.location.href,
                                        $('#post_form').serialize(),
                                        function (res) {
                                            message(res.message,res.redirect,res.type)
                                        },'json'
                                    );
                                });
                            });
                        </script>
                    </div>
                    <!-- /.tab-content -->
                </div>
                <!-- /.nav-tabs-custom -->
            </div>
            <!-- /.col -->
        </div>
    </section>
</div>
{include file='common/ufooter'}
